package com.example.hyznbk.model.api;

import com.example.hyznbk.service.HttpGetServer;
import com.lancoo.rxretrofitlibrary.Api.BaseApi;
import com.lancoo.rxretrofitlibrary.Api.UserInfo;
import com.lancoo.rxretrofitlibrary.listener.HttpOnNextListener;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
import com.trello.rxlifecycle.components.support.RxFragment;

import retrofit2.Retrofit;
import rx.Observable;

/**
 * Created by tangminglong on 17/9/26.
 */

public class LearnTypeApi extends BaseApi {
    public LearnTypeApi(HttpOnNextListener listener, RxAppCompatActivity rxAppCompatActivity) {
        super(listener, rxAppCompatActivity);
    }

    public LearnTypeApi(HttpOnNextListener listener, RxFragment rxFragment) {
        super(listener, rxFragment);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpGetServer httpGetServer = retrofit.create(HttpGetServer.class);
        return httpGetServer.getAllLearnType(UserInfo.SubjectId,UserInfo.StageNo);
    }
}
